package org.example.aaaatest.jsonString;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.ArrayList;
import java.util.List;

/**
 * @description:
 * @author: wangbaogui
 * @create: 2025/2/26 20:48
 **/
public class aaa {
    public static void main(String[] args) throws JsonProcessingException {

        String a = "{\"status\":\"ok\",\"message\":\"\",\"data\":{\"amap_order_id\":\"222\",\"cp_amap_order_id\":\"3333\",\"driver_unique_id\":\"default\",\"cp_order_id\":\"null\",\"user_id\":\"574280533\",\"predict_score\":{\"abuse_score\":0.5},\"request_time\":1.014892578125,\"feature_time\":0,\"model_time\":" +
                "0.954833984375,\"detail\":{\"first_abuse_role\":\"driver\",\"driver_abuse_words_count\":2,\"driver_abuse_words_count_detail\":{\"你大爷\":1,\"妈了个\":1}" +
                ",\"driver_abuse_words_sentence_detail\":[{\"你大爷\":\"喂能听到吗 你奶奶个腿 时长那人确实有点不太够 我去你大爷的，妈了个巴的\"}," +
                "{\"妈了个\":\"喂能听到吗 你奶奶个腿 时长那人确实有点不太够 我去你大爷的，妈了个巴的\"}],\"user_abuse_words_count\"" +
                ":2,\"user_abuse_words_count_detail\":{\"你大爷\":1,\"妈了个\":1},\"user_abuse_words_sentence_detail\"" +
                ":[{\"你大爷\":\"乘客给司机拨打电话测试，语音骂人 我去你大爷的，你妈了个巴\"},{\"妈了个\":\"乘客给司机拨打电话测试，语音骂人 我去你大爷的，你妈了个巴\"}]},\"feature\":{}}}";


        ObjectMapper objectMapper = new ObjectMapper();
      // objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
        BodLanguageDetailResponse bodLanguageDetailResponse = objectMapper.readValue(a, BodLanguageDetailResponse.class);
       // System.out.println("bodLanguageDetailResponse = " + bodLanguageDetailResponse);

       /* String b = "{\"status\":\"ok\",\"message\":\"\",\"data\":{\"amap_order_id\":\"222\",\"cp_amap_order_id\":\"3333\",\"driver_unique_id\":\"default\",\"cp_order_id\":\"null\",\"user_id\":\"574280533\",\"predict_score\":{\"abuse_score\":0.5},\"request_time\":1.014892578125,\"feature_time\":0,\"model_time\":0.954833984375,\"feature\":{}}}";


        ObjectMapper objectMapper1 = new ObjectMapper();
        objectMapper1.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
        BodLanguageDetailResponse bodLanguageDetailResponse1 = objectMapper1.readValue(b, BodLanguageDetailResponse.class);
        System.out.println("bodLanguageDetailResponse = " + bodLanguageDetailResponse1);
*/

        BodLanguageDetail bodLanguageDetail = new BodLanguageDetail();
        bodLanguageDetail.setFirstAbuseRole("sss");
        bodLanguageDetail.setUserAbuseWordsSentenceDetail(null);
        Object json = JSON.toJSON(bodLanguageDetail);
        System.out.println("json = " + json);


        List<BodLanguageDetailResponse> bodLanguageDetailResponses = new ArrayList<>();
        bodLanguageDetail=null;
        BodLanguageDetailResponse bodLanguageDetailResponse1 = bodLanguageDetailResponses.get(0);
        System.out.println("bodLanguageDetailResponse1 = " + bodLanguageDetailResponse1);
    }
}
